The moving of files
Working code.
Very messy, and needs to be cleaned up.