Whitespace, syntax, general code cleanup

Related: #29