This moves the code used by the backend and API to common/resolve.py and moves the code used just by the API to web/mse.py.