Factor out the smartfile client from main.views completely and put it into the 'Smartfile' class.