Refactored ACL. Fixed tests.