Added ACL check, phpdocs and  standardized indentation