Refactoring/simplification/testing of ACL-related functions/frames