Use built-in `find` method
Use built-in `sum` method
Merge pull request #5 from qerub/master

Some code simplifications