Working on Upload, also refactor PHP a bit