Allow downloading of inbox; some function shuffling