Simplify some expressions because of defaultdict
Merge pull request #3 from ruippeixotog/some-code-style

Simplify some expressions because of defaultdict