Fixes for #9, #11 and some other improvements

review commit messages for change log