Rewrite

This is the PR for the rewrite. We are rewriting so that we can restructure things and because everything is a mess leading in the wrong direction.