Moved controller code from download to app