Refactoring

Tidying up from phpcs output
Refactoring