fixing php54 warnings, cleanup stype and removing unused files