Updated to the latest rust master

Also split all the different main structs into their own file to make it easier to find certain mods.