Cleaning up code and updating README