I'm thinking a lot of this code should move into the README, partly to ensure it stays up to date