reorganized upload handling, splitting out form functionality into directives, looking at session handling