Total redo of repo structure.

The new more pragmatic structure mimics how an implementation of the
code could look.