PSR compliance

changed tabs to spaces, code formatting and improved legibility