Some minor refactorings, added coverage reports