More rewriting
More common-jsing of the code base.

This may take some time...
Some more porting