Initial commit of lots of working stuff.