Fixed issue with ree. Refactored. Updated README