Initial commit of the source code

Really ugly code.  Needs a lot of work.