Initial Refractoring
Moved everything to roughly the right package.