Reformatted and refactored code to make it mor PSR-complaint