Refactored ACL. Fixed tests