moved upload function to correct location
Merge pull request #9 from ajy/master

Minor refactor