Fixed code coverage and factorized Makefiles