Tidies up some PHP