Refactoring for PSR-2 support