Refactoring, simplifying, PSR code style update