Fixed some bad files, changed to php