Finished (more or less)

No GUI, but I'm not going to bother with that at this point.