move the mime stuff in a proper utils.py file

and the shell stuff in the shellbackend file