Improve documentation
Increase test coverage
add dictionary file for testing
apply cosmetic changes and some refactoring