few refactorings to facilitate unit testing + more unit tests
updated code coverage thresholds