Clean up API, move common code into CreateContent.hs and make sure gist code is correct, which fixes #30.