Various fixes to make this closer to my Prelude setup.

@gja could you take a look please?