Fixed comments and updated checkAccess