Lots of commits...oops

This is working code for the first prototype.