This pull requests addresses more suggestions from @demobox.