Split PHP into separate files, finished functionality, removed unused files