Functional Source - Final

Although I can do a lot more with formatting etc, this is the final
code base that’s functional and tested.