Code Reorganization

Moved the rest of the code from `util.py` dealing with interaction with
the backend to `backend.py`.

Added a `TODO` comment about a very minor bug.