Cleaned up the access control mechanism