Comments and cleanup for code review, see #31.