Added several tests and improved coverage definition.
Merge pull request #421 from opdemand/more-better-tests

Added several tests and improved coverage definition.