Changes to support 5.2 update
Refactoring made to access control to make it more DRY