Refactor code and add simple config file support.
More refactor and always upload setting. Fixes issue #2.
Updated README about configuration file.
Merge pull request #9 from erikw/refactor_and_config

Refactor and config