Some changes related to syntax and language usage

* Used python3 string formatting in various places
* Replaces existence and value checks on dictionary with get method usage
* Simplified logic in a couple of places
* Replaced mutable default parameters (can cause serious problems as default parameters are only ever instantiated once!)

I've decided to keep this small in case you decide not to approve this pull request. If you do, I would not mind helping you improve on your code a bit more, such as applying the pep8 python coding standard and using unit test and mocking libraries for testing.