Refactoring and fixes
Updated README and build instructions