Pass around configuration object instead of globals.
Fix bug with saving configuration.
Add const modifier to appropriate functions
Fix saving/loading configuration.
Merge pull request #95 from billbindi/master

Pass around configuration object
fixing merge conflicts