Refactoring and documentation tasks

Make PSR-3 compatible