First working version of code. Tutorial/Schematic to come.