Fixed parse error in php
Fixed a bunch of broken things