Formatting fixes

I opened the project file per file to figure out how it works and I reformatted some parts of code according to the php-fig standards.