Code cleanup, part of code review, see #56.