Lots of code motion
Add forgotten files