Initial commit of actual code

Sync up with what I had written locally.