Big ugly commit so I can delete this copy fo the repo. Sorry.
Another big commit. Oh well.