It Works!

Refactor after reverting to previous stage. This basically implements
everything that was reverted. Doh!

Updates and cleanup across the board.