Updated README and minor refactoring