Merge pull request #25 from Mause/master

Replace remaining(?) get_action().add_action calls with add_action
Dedent for clarity
Refactor using list comprehensions
Replace code duplication with loop
Chain some if statements
Move some imports
Comprehension refactors
dictionary literal refactors
Generic refactors