Addressed a number of code review comments, see #26.