Comments, formatting and a few missing tests.