add file renaming, fixed a lot of stuff.