Probably too much stuff for one commit … so sue me.

Very basic initial functionality implemented.