Added code coverage tool
fixed some gaps in testing code coverage