Finished refactoring. uploadFile moved to popup.js.
Issue #7