Merged changes from the quota-branch: