Brought things to a good state. @kazark, how does this look?