Acl and DB improves

Also some bugs fixed