Refactoring code to PSR-1 and PSR-2.