Enhances comments, coding standards and readability

https://github.com/Elgg/Elgg/issues/6230