Cleaning up code and updating README and docs