updated to Elgg coding standards