Add work
Massive reorganization of code