Added settings page and lots of bug fixes
Merge pull request #27 from thgh/master

Added settings page and lots of bug fixes