Working Plugin Upload, Rearranged upload code

Sorted out the plugin code so that it makes more sense and flows better.
Changed the Plugin class Identity property so that it inserts properly.