Some code formatting, simplification

...ed PHP formatting a bit