Refactored according to PSR-2 coding style