fixing bad PHP and code alignments