Reindent & comment createCommit

Using the State monad can get confusing, and we added comments to remind
ourselves of the bug we fixed in 133e8121a
Fix datatype syntax
Preliminary rebaseStep
WIP resolve + comments