Update dependencies and added coveralls.io
Reduced code complexity.