Commit fileupload for testing. No idea how to refactor everything and seems like performance is a big issue. :(