FIX: bug on rehash method, improved toString(), some refactoring and comments