added configuration-file support, and some instructional stuff

Hullo, I should have done this a bit more atomically - this is a dump of stuff, but I haven't made any major changes to the actual program except adding config-file functionality.