Replace if statements with python's...

Replace if statements with python's dictionary `.get()` method for setting default values.