diff --git a/CMakeModules/astyle.cmake b/CMakeModules/astyle.cmake
index c0d960921d5881a1f8565dcf0e913b123a3f89e0..3e4d4c4fbd2b253a59eac87efaa52be493c51887 100644
--- a/CMakeModules/astyle.cmake
+++ b/CMakeModules/astyle.cmake
@@ -1,14 +1,12 @@
 find_program(ASTYLE_EXECUTABLE astyle)
 
-add_custom_target(ASTYLE)
-
 if(ASTYLE_EXECUTABLE)
 	message(STATUS "Found astyle, using astyle to format code of target ${target}.")
 	add_custom_target(astyle ALL
 		COMMAND
 		${ASTYLE_EXECUTABLE} -i
 			--exclude=${PROJECT_BINARY_DIR}
-			--recursive -n --style=google --indent=spaces=4
+			--recursive -n --style=google
 			"${PROJECT_SOURCE_DIR}/*.cpp" "${PROJECT_SOURCE_DIR}/*.h"
 		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 		VERBATIM	
diff --git a/CMakeModules/testing_cpp.cmake b/CMakeModules/testing_cpp.cmake
index 01179b9c1dfdd7ce0738c1f0d0fe65116b8c774c..6b6564e9e98de3e37378c93fb8d868fea62984db 100644
--- a/CMakeModules/testing_cpp.cmake
+++ b/CMakeModules/testing_cpp.cmake
@@ -19,6 +19,7 @@ function(gtest target test_source_files test_libraries)
         if (CMAKE_COMPILER_IS_GNUCXX)
             include(CodeCoverage)
             APPEND_COVERAGE_COMPILER_FLAGS()
+            set (COVERAGE_EXCLUDES '*/unittests/*')
             SETUP_TARGET_FOR_COVERAGE(NAME coverage-${target} EXECUTABLE test-${target} ${target})
             add_test(NAME coveragetest-${target}
                     COMMAND ${CMAKE_MODULE_PATH}/check_test.sh