Refactor

Cleaning up code to allow a shift towards the work that Stefan has done.

Plan to reproduce Josh's excellent cython work soon to be more similar to Stefans approach.