Updated to Elgg coding standards