Refactored code to PSR conventions.