diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b0303648adc56ca4344e72606e1dac5b9ab320fe..e7e3157532535ea456d20952211a26c1092b4ee7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,21 +32,11 @@ test-and-coverage:
   script:
     # Download casacore wsrt measures
     - wget -q ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar && tar -xf WSRT_Measures.ztar -C /var/lib/casacore/data/ && rm -f WSRT_Measures.ztar
-    # Download LOFAR/VLA/MWA Mock measurement set
-    - ./scripts/download_lofar_ms.sh && export LOFAR_MOCK_MS=$PWD/test_data/LOFAR_MOCK.ms/
-    - ./scripts/download_vla_ms.sh && export VLA_MOCK_MS=$PWD/test_data/VLA_MOCK.ms/
-    - ./scripts/download_mwa_ms.sh && export MWA_MOCK_MS=$PWD/test_data/MWA_MOCK.ms/
-    - ./scripts/download_mwa_coeff.sh && export MWA_COEFF_PATH=$PWD/test_data/mwa_full_embedded_element_pattern.h5
-    # Build in Debug mode and add LOFAR_MOCK_MS
+    # Build in Debug mode
     - mkdir build && cd build
-    - | 
-      cmake \
-      -DCMAKE_INSTALL_PREFIX=.. -DLOFAR_MOCK_MS=$LOFAR_MOCK_MS \
-      -DVLA_MOCK_MS=$VLA_MOCK_MS \
-      -DMWA_MOCK_MS=$MWA_MOCK_MS -DMWA_COEFF_PATH=$MWA_COEFF_PATH \
-      -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-coverage" -DCMAKE_EXE_LINKER_FLAGS="-coverage" ..
+    - cmake -DCMAKE_INSTALL_PREFIX=.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-coverage" -DCMAKE_EXE_LINKER_FLAGS="-coverage" ..
     - make install -j8
-    - ctest -T test
+    - ctest -j4 -T test
     # Capture coverage
     - gcovr -r .. -e '.*/external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*' -e '.*/demo/.*'
     - gcovr -r .. -e '.*/external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*' -e '.*/demo/.*' --xml > coverage.xml
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f73a9a82e4b5e229e13dce15343e187d1f44189..903af813301dac1b83ffc2fc9b39bfa49799b422 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
 # Configure directory for data files
 set(CMAKE_INSTALL_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${projectname}")
 message("Storing data in: " ${CMAKE_INSTALL_DATA_DIR})
-configure_file(${CMAKE_SOURCE_DIR}/CMake/config.h.in ${CMAKE_BINARY_DIR}/config.h)
 
 # Find and include git submodules
 find_package(Git QUIET)
@@ -51,7 +50,7 @@ include_directories(${CASACORE_INCLUDE_DIR})
 find_package(OpenMP REQUIRED)
 
 # Find and include Boost headers (boost::math required for MWA beam)
-find_package(Boost REQUIRED) 
+find_package(Boost REQUIRED)
 include_directories(${Boost_INCLUDE_DIR})
 
 #------------------------------------------------------------------------------
@@ -101,10 +100,15 @@ add_subdirectory(cpp)
 #------------------------------------------------------------------------------
 # Add tests
 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
-   add_subdirectory(cpp/test)
-   # TODO: compiling the demos should probably be a different cmake project
-   # in which we use find_package(EveryBeam)
-   add_subdirectory(demo)
+  # TODO: compiling the demos should probably be a different cmake project
+  # in which we use find_package(EveryBeam)
+  add_subdirectory(demo)
+
+  if(Boost_FOUND)
+    add_subdirectory(cpp/test)
+  else()
+    message("Boost NOT found. This is not an error but indicates that the tests won't be built.")
+  endif()
 endif()
 
 #------------------------------------------------------------------------------
diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt
index 4917f084ffa1eabf00d7da6c9ce53c0e98ad82d0..f2ccfdc7e7c8345fc018c26bba95d51f4bc38176 100644
--- a/cpp/test/CMakeLists.txt
+++ b/cpp/test/CMakeLists.txt
@@ -1,55 +1,68 @@
 # Find boost
 find_package(Boost COMPONENTS unit_test_framework)
 
-add_executable(taocommon taocommon.cc)
-add_executable(teigen teigen.cc)
-add_executable(tpybind11 tpybind11.cc)
-target_link_libraries(tpybind11 PRIVATE pybind11::embed)
+# Set cache values if not specified
+set(LOFAR_MOCK_MS ${CMAKE_SOURCE_DIR}/test_data/LOFAR_MOCK.ms CACHE PATH "")
+set(VLA_MOCK_MS ${CMAKE_SOURCE_DIR}/test_data/VLA_MOCK.ms CACHE PATH "")
+set(MWA_MOCK_MS ${CMAKE_SOURCE_DIR}/test_data/MWA_MOCK.ms CACHE PATH "")
+set(MWA_COEFF_PATH ${CMAKE_SOURCE_DIR}/test_data/mwa_full_embedded_element_pattern.h5 CACHE PATH "")
 
-# Add test
-add_test(submodule-tests taocommon)
-add_test(submodule-tests teigen)
-add_test(submodule-tests tpybind11)
+configure_file(${CMAKE_SOURCE_DIR}/CMake/config.h.in ${CMAKE_BINARY_DIR}/config.h)
 
 #------------------------------------------------------------------------------
-# Add tests if Boost found
-if(Boost_FOUND)
-    include_directories(${Boost_INCLUDE_DIR})
-    set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/runtests.cc)
+set(TEST_FILENAMES
+  runtests.cc
+  tlofar.cc
+  tmwa.cc
+  tstation.cc
+  tvla.cc
+)
 
-    # Test LOFAR beamforming
-    if( LOFAR_MOCK_MS )        
-        set(TEST_SOURCES 
-            ${TEST_SOURCES}
-            ${CMAKE_CURRENT_SOURCE_DIR}/tload_lofar.cc
-        )
-    endif()
+# Add boost dynamic link flag for all test files.
+# https://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/usage_variants.html
+# Without this flag, linking is incorrect and boost performs duplicate delete()
+# calls after running all tests, in the cleanup phase.
+set_source_files_properties(
+  ${TEST_FILENAMES} PROPERTIES COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK"
+)
 
-    # Test VLA beamforming
-    if( VLA_MOCK_MS )
-        set(TEST_SOURCES 
-            ${TEST_SOURCES}
-            ${CMAKE_CURRENT_SOURCE_DIR}/tvla.cc
-        )
-    endif()
-
-    # Test MWA beamforming (assumes that mwa h5 coefficients file can be found!)
-    if( MWA_MOCK_MS AND MWA_COEFF_PATH )
-        set(TEST_SOURCES 
-            ${TEST_SOURCES}
-            ${CMAKE_CURRENT_SOURCE_DIR}/tmwa.cc
-        )
-    elseif( MWA_MOCK_MS OR MWA_COEFF_PATH )
-        message(WARNING "To compile the MWA test, both the MWA_MOCK_MS and MWA_COEFF_PATH needs to be set. Now skipping MWA test compiling.")
-    endif()
-
-    # Add test executable
-    add_executable(runtests ${TEST_SOURCES})
-    target_link_libraries(runtests everybeam ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-    # Required to get the config.h header
-    target_include_directories(runtests PRIVATE "${CMAKE_BINARY_DIR}")
-
-    add_test(runtests runtests)
-endif()
+add_test(
+  NAME download_lofar_ms
+  COMMAND ${CMAKE_SOURCE_DIR}/scripts/download_lofar_ms.sh
+)
+add_test(
+  NAME download_vla_ms
+  COMMAND ${CMAKE_SOURCE_DIR}/scripts/download_vla_ms.sh
+)
+add_test(
+  NAME download_mwa_ms
+  COMMAND ${CMAKE_SOURCE_DIR}/scripts/download_mwa_ms.sh
+)
+add_test(
+  NAME download_mwa_coeff
+  COMMAND ${CMAKE_SOURCE_DIR}/scripts/download_mwa_coeff.sh
+)
+set_tests_properties(
+  download_lofar_ms download_vla_ms download_mwa_ms download_mwa_coeff
+  PROPERTIES FIXTURES_SETUP mocks
+)
 
+add_executable(
+  unittests EXCLUDE_FROM_ALL
+  ${TEST_FILENAMES}
+)
+target_link_libraries(unittests everybeam ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
+# Required to get the config.h header
+target_include_directories(unittests PRIVATE "${CMAKE_BINARY_DIR}")
 
+# Add tests for ctest
+add_test(buildunittests ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target unittests)
+set_tests_properties(buildunittests PROPERTIES FIXTURES_SETUP unittests)
+add_test(
+  NAME unittests
+  COMMAND unittests -f JUNIT -k unittests.xml --catch_system_error=yes
+)
+set_tests_properties(
+  unittests PROPERTIES LABELS unit
+  FIXTURES_REQUIRED "unittests;mocks"
+)
\ No newline at end of file
diff --git a/cpp/test/runtests.cc b/cpp/test/runtests.cc
index e93c2e3ae49574285f7ef558ef195a6b6bda042e..3052dcccae516635caf51805f5b1a350f82f968c 100644
--- a/cpp/test/runtests.cc
+++ b/cpp/test/runtests.cc
@@ -1,4 +1,3 @@
 #define BOOST_TEST_MODULE everybeam
-#define BOOST_TEST_DYN_LINK
 
-#include <boost/test/unit_test.hpp>
\ No newline at end of file
+#include <boost/test/unit_test.hpp>
diff --git a/cpp/test/taocommon.cc b/cpp/test/taocommon.cc
deleted file mode 100644
index f645c512c940b4ccbf49aca43b29c4f9e71ef3b6..0000000000000000000000000000000000000000
--- a/cpp/test/taocommon.cc
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <aocommon/matrix2x2.h>
-#include <iostream>
-
-int main() {
-  double unit[4] = {1.0, 0.0, 0.0, 1.0};
-  double e1, e2;
-  aocommon::Matrix2x2::EigenValues(unit, e1, e2);
-  std::cout << "EigenValue 1 " << e1 << "\nEigenvalue 2 " << e2 << std::endl;
-  return 0;
-}
diff --git a/cpp/test/teigen.cc b/cpp/test/teigen.cc
deleted file mode 100644
index 103ddd5aa58288ff4e4dfc4a3d7bdaf916097c43..0000000000000000000000000000000000000000
--- a/cpp/test/teigen.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <iostream>
-#include <Eigen/Dense>
-
-using Eigen::MatrixXd;
-
-int main() {
-  MatrixXd m(2, 2);
-  m(0, 0) = 3;
-  m(1, 0) = 2.5;
-  m(0, 1) = -1;
-  m(1, 1) = m(1, 0) + m(0, 1);
-  std::cout << m << std::endl;
-}
diff --git a/cpp/test/tload_lofar.cc b/cpp/test/tlofar.cc
similarity index 75%
rename from cpp/test/tload_lofar.cc
rename to cpp/test/tlofar.cc
index ffc3c4519dbc3f9cc124c2af2aa31570c5aeb5d2..1f0433eb39659ff463bd05ca25b518743e0f3a88 100644
--- a/cpp/test/tload_lofar.cc
+++ b/cpp/test/tlofar.cc
@@ -10,7 +10,16 @@
 #include <complex>
 #include <cmath>
 
-namespace everybeam {
+using everybeam::ElementResponseModel;
+using everybeam::Load;
+using everybeam::Options;
+using everybeam::coords::CoordinateSystem;
+using everybeam::griddedresponse::GriddedResponse;
+using everybeam::griddedresponse::LOFARGrid;
+using everybeam::telescope::LOFAR;
+using everybeam::telescope::Telescope;
+
+BOOST_AUTO_TEST_SUITE(tlofar)
 
 BOOST_AUTO_TEST_CASE(load_lofar) {
   Options options;
@@ -19,18 +28,17 @@ BOOST_AUTO_TEST_CASE(load_lofar) {
   casacore::MeasurementSet ms(LOFAR_MOCK_MS);
 
   // Load LOFAR Telescope
-  std::unique_ptr<telescope::Telescope> telescope = Load(ms, options);
+  std::unique_ptr<Telescope> telescope = Load(ms, options);
 
   // Assert if we indeed have a LOFAR pointer
-  BOOST_CHECK(nullptr != dynamic_cast<telescope::LOFAR*>(telescope.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<LOFAR*>(telescope.get()));
 
   // Assert if correct number of stations
   std::size_t nstations = 70;
   BOOST_CHECK_EQUAL(telescope->GetNrStations(), nstations);
 
   // Assert if GetStation(stationd_id) behaves properly
-  const telescope::LOFAR& lofartelescope =
-      static_cast<const telescope::LOFAR&>(*telescope.get());
+  const LOFAR& lofartelescope = static_cast<const LOFAR&>(*telescope.get());
   BOOST_CHECK_EQUAL(lofartelescope.GetStation(0)->GetName(), "CS001HBA0");
 
   // Properties extracted from MS
@@ -40,18 +48,17 @@ BOOST_AUTO_TEST_CASE(load_lofar) {
   double ra(2.15374123), dec(0.8415521), dl(0.5 * M_PI / 180.),
       dm(0.5 * M_PI / 180.), shift_l(0.), shift_m(0.);
 
-  coords::CoordinateSystem coord_system = {.width = width,
-                                           .height = height,
-                                           .ra = ra,
-                                           .dec = dec,
-                                           .dl = dl,
-                                           .dm = dm,
-                                           .phase_centre_dl = shift_l,
-                                           .phase_centre_dm = shift_m};
-  std::unique_ptr<griddedresponse::GriddedResponse> grid_response =
+  CoordinateSystem coord_system = {.width = width,
+                                   .height = height,
+                                   .ra = ra,
+                                   .dec = dec,
+                                   .dl = dl,
+                                   .dm = dm,
+                                   .phase_centre_dl = shift_l,
+                                   .phase_centre_dm = shift_m};
+  std::unique_ptr<GriddedResponse> grid_response =
       telescope->GetGriddedResponse(coord_system);
-  BOOST_CHECK(nullptr !=
-              dynamic_cast<griddedresponse::LOFARGrid*>(grid_response.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<LOFARGrid*>(grid_response.get()));
 
   // Define buffer and get gridded responses
   std::vector<std::complex<float>> antenna_buffer_single(
@@ -101,10 +108,9 @@ BOOST_AUTO_TEST_CASE(load_lofar) {
   options_diff_beam.use_differential_beam = true;
 
   // Load LOFAR Telescope
-  std::unique_ptr<telescope::Telescope> telescope_diff_beam =
-      Load(ms, options_diff_beam);
+  std::unique_ptr<Telescope> telescope_diff_beam = Load(ms, options_diff_beam);
 
-  std::unique_ptr<griddedresponse::GriddedResponse> grid_response_diff_beam =
+  std::unique_ptr<GriddedResponse> grid_response_diff_beam =
       telescope_diff_beam->GetGriddedResponse(coord_system);
 
   std::vector<std::complex<float>> antenna_buffer_diff_beam(
@@ -123,4 +129,5 @@ BOOST_AUTO_TEST_CASE(load_lofar) {
   npy::SaveArrayAsNumpy("lofar_station_responses.npy", false, 4, leshape,
                         antenna_buffer_single);
 }
-}  // namespace everybeam
\ No newline at end of file
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/cpp/test/tmwa.cc b/cpp/test/tmwa.cc
index 8ce80feeb8e5be03985f9d6bbd84ee686078c3df..82840e1798d2a66ef921df83c43e87209700e70d 100644
--- a/cpp/test/tmwa.cc
+++ b/cpp/test/tmwa.cc
@@ -9,7 +9,15 @@
 #include <complex>
 #include <cmath>
 
-namespace everybeam {
+using everybeam::Load;
+using everybeam::Options;
+using everybeam::coords::CoordinateSystem;
+using everybeam::griddedresponse::GriddedResponse;
+using everybeam::griddedresponse::MWAGrid;
+using everybeam::telescope::MWA;
+using everybeam::telescope::Telescope;
+
+BOOST_AUTO_TEST_SUITE(tmwa)
 
 BOOST_AUTO_TEST_CASE(load_mwa) {
   Options options;
@@ -18,10 +26,10 @@ BOOST_AUTO_TEST_CASE(load_mwa) {
 
   casacore::MeasurementSet ms(MWA_MOCK_MS);
 
-  std::unique_ptr<telescope::Telescope> telescope = Load(ms, options);
+  std::unique_ptr<Telescope> telescope = Load(ms, options);
 
   // Assert if we indeed have a MWA pointer
-  BOOST_CHECK(nullptr != dynamic_cast<telescope::MWA*>(telescope.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<MWA*>(telescope.get()));
 
   // Assert if correct number of stations
   std::size_t nstations = 128;
@@ -32,19 +40,18 @@ BOOST_AUTO_TEST_CASE(load_mwa) {
   std::size_t width(16), height(16);
   double ra(2.18166148), dec(-0.74612826), dl(1. * M_PI / 180.),
       dm(1. * M_PI / 180.), shift_l(0.), shift_m(0.);
-  coords::CoordinateSystem coord_system = {.width = width,
-                                           .height = height,
-                                           .ra = ra,
-                                           .dec = dec,
-                                           .dl = dl,
-                                           .dm = dm,
-                                           .phase_centre_dl = shift_l,
-                                           .phase_centre_dm = shift_m};
-
-  std::unique_ptr<griddedresponse::GriddedResponse> grid_response =
+  CoordinateSystem coord_system = {.width = width,
+                                   .height = height,
+                                   .ra = ra,
+                                   .dec = dec,
+                                   .dl = dl,
+                                   .dm = dm,
+                                   .phase_centre_dl = shift_l,
+                                   .phase_centre_dm = shift_m};
+
+  std::unique_ptr<GriddedResponse> grid_response =
       telescope->GetGriddedResponse(coord_system);
-  BOOST_CHECK(nullptr !=
-              dynamic_cast<griddedresponse::MWAGrid*>(grid_response.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<MWAGrid*>(grid_response.get()));
 
   std::vector<std::complex<float>> antenna_buffer(
       grid_response->GetBufferSize(telescope->GetNrStations()));
@@ -87,4 +94,5 @@ BOOST_AUTO_TEST_CASE(load_mwa) {
   npy::SaveArrayAsNumpy("mwa_station_responses.npy", false, 4, leshape,
                         antenna_buffer);
 }
-}  // namespace everybeam
\ No newline at end of file
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/cpp/test/tpybind11.cc b/cpp/test/tpybind11.cc
deleted file mode 100644
index 20e9e68ba86dc31150ab869e6c325929737081c2..0000000000000000000000000000000000000000
--- a/cpp/test/tpybind11.cc
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <pybind11/pybind11.h>
-#include <pybind11/eigen.h>
-
-int main() {
-  // Empty, just check if headers are correctly found
-  return 0;
-}
\ No newline at end of file
diff --git a/cpp/test/tstation.cc b/cpp/test/tstation.cc
index 08d5622cfb21b8dcda8e07f67d15c9af05daacd2..5c5626351faeebe8c442aae52e1bd3d90b88673e 100644
--- a/cpp/test/tstation.cc
+++ b/cpp/test/tstation.cc
@@ -1,7 +1,10 @@
 #include "./../station.h"
 
-// TODO: make a test out of this
-int main() {
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_SUITE(tstation)
+
+BOOST_AUTO_TEST_CASE(station) {
   const everybeam::vector3r_t position = {{1.0, 2.0, 3.0}};
 
   std::string name = "station0_LBA";
@@ -14,9 +17,6 @@ int main() {
   auto element_response = station->GetElementResponse();
 
   double freq = 50e6;
-  double theta = 0.0;
-  double phi = 0.0;
-  std::complex<double> response[2][2];
 
   constexpr int N = 100;
   std::vector<std::complex<double>> result(N * N * 2 * 2);
@@ -30,11 +30,10 @@ int main() {
       double y = (2.0 * j) / (N - 1) - 1.0;
       double theta = asin(sqrt(x * x + y * y));
       double phi = atan2(y, x);
-
-      double az = M_PI - phi;
-      double el = M_PI_2 - theta;
-      element_response->Response(0, freq, theta, phi, result_arr[i][j]);
+      BOOST_REQUIRE_NO_THROW(
+          element_response->Response(0, freq, theta, phi, result_arr[i][j]));
     }
   }
-  return 0;
 }
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/cpp/test/tvla.cc b/cpp/test/tvla.cc
index 279781112d46241937a9f581abecbb92f62a368b..76364a394d16161a7f795f9c0f935f3d796a9ae1 100644
--- a/cpp/test/tvla.cc
+++ b/cpp/test/tvla.cc
@@ -10,16 +10,24 @@
 #include <complex>
 #include <cmath>
 
-namespace everybeam {
+using everybeam::Load;
+using everybeam::Options;
+using everybeam::coords::CoordinateSystem;
+using everybeam::griddedresponse::DishGrid;
+using everybeam::griddedresponse::GriddedResponse;
+using everybeam::telescope::Dish;
+using everybeam::telescope::Telescope;
+
+BOOST_AUTO_TEST_SUITE(tvla)
 
 BOOST_AUTO_TEST_CASE(load_vla) {
   Options options;
   casacore::MeasurementSet ms(VLA_MOCK_MS);
 
-  std::unique_ptr<telescope::Telescope> telescope = Load(ms, options);
+  std::unique_ptr<Telescope> telescope = Load(ms, options);
 
   // Assert if we indeed have a VLA pointer
-  BOOST_CHECK(nullptr != dynamic_cast<telescope::Dish*>(telescope.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<Dish*>(telescope.get()));
 
   // Assert if correct number of stations
   std::size_t nstations = 25;
@@ -32,18 +40,17 @@ BOOST_AUTO_TEST_CASE(load_vla) {
   double ra(2.62880729), dec(0.02831797), dl(0.125 * M_PI / 180.),
       dm(0.125 * M_PI / 180.), shift_l(0.), shift_m(0.);
 
-  coords::CoordinateSystem coord_system = {.width = width,
-                                           .height = height,
-                                           .ra = ra,
-                                           .dec = dec,
-                                           .dl = dl,
-                                           .dm = dm,
-                                           .phase_centre_dl = shift_l,
-                                           .phase_centre_dm = shift_m};
-  std::unique_ptr<griddedresponse::GriddedResponse> grid_response =
+  CoordinateSystem coord_system = {.width = width,
+                                   .height = height,
+                                   .ra = ra,
+                                   .dec = dec,
+                                   .dl = dl,
+                                   .dm = dm,
+                                   .phase_centre_dl = shift_l,
+                                   .phase_centre_dm = shift_m};
+  std::unique_ptr<GriddedResponse> grid_response =
       telescope->GetGriddedResponse(coord_system);
-  BOOST_CHECK(nullptr !=
-              dynamic_cast<griddedresponse::DishGrid*>(grid_response.get()));
+  BOOST_CHECK(nullptr != dynamic_cast<DishGrid*>(grid_response.get()));
 
   std::vector<std::complex<float>> antenna_buffer(
       grid_response->GetBufferSize(telescope->GetNrStations()));
@@ -92,4 +99,5 @@ BOOST_AUTO_TEST_CASE(load_vla) {
   npy::SaveArrayAsNumpy("vla_station_responses.npy", false, 4, leshape,
                         antenna_buffer);
 }
-}  // namespace everybeam
\ No newline at end of file
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/docker/Dockerfile-base b/docker/Dockerfile-base
index 5cea9bac97337ded86fe6dee836ff34f6e479ab1..c087215934c582fb75e8428e60940b871a220913 100644
--- a/docker/Dockerfile-base
+++ b/docker/Dockerfile-base
@@ -1,34 +1,13 @@
-#
 # base
-#
 FROM ubuntu:18.04
-RUN apt-get update
-RUN apt-get upgrade -y
-
-#
+RUN apt-get update && apt-get upgrade -y && \
 # install astronomy packages
-#
-RUN apt-get -y install casacore-dev
-RUN apt-get -y install python-casacore
-RUN apt-get -y install aoflagger-dev
-RUN apt-get -y install libcfitsio-dev
-RUN apt-get -y install wcslib-dev
-
-#
+    apt-get -y install casacore-dev python-casacore \
+        aoflagger-dev libcfitsio-dev wcslib-dev
 # install misc packages
-#
-RUN apt-get update
-RUN apt-get -y install wget git make cmake g++ doxygen graphviz
-
-#
+RUN apt-get update && \
+    apt-get -y install wget git make cmake g++ doxygen graphviz \
 # install dependencies
-#
-RUN apt-get -y install libboost-all-dev
-RUN apt-get -y install libhdf5-dev
-RUN apt-get -y install libfftw3-dev
-RUN apt-get -y install libblas-dev
-RUN apt-get -y install liblapack-dev
-RUN apt-get -y install libgsl-dev
-RUN apt-get -y install libxml2-dev
-RUN apt-get -y install libpng-dev
-RUN apt-get -y install libgtkmm-3.0-dev
+        libboost-all-dev libhdf5-dev libfftw3-dev \
+        libblas-dev liblapack-dev libgsl-dev libxml2-dev \
+        libpng-dev libgtkmm-3.0-dev
diff --git a/docker/Dockerfile-dp3 b/docker/Dockerfile-dp3
index 5760f85c34b5975df9beb6aded92f2ff426b4c9c..44e50acce7fdc2e15f19ee34464bf404b074c466 100644
--- a/docker/Dockerfile-dp3
+++ b/docker/Dockerfile-dp3
@@ -12,8 +12,7 @@ ENV INSTALLDIR /opt
 ENV DP3_VERSION 4.1
 ENV DP3_BRANCH oskar
 RUN mkdir -p ${INSTALLDIR}/dp3/build
-RUN cd ${INSTALLDIR}/dp3 && git clone https://github.com/lofar-astron/DP3.git dp3
-RUN cd ${INSTALLDIR}/dp3/dp3 && git checkout ${DP3_BRANCH}
+RUN cd ${INSTALLDIR}/dp3 && git clone https://github.com/lofar-astron/DP3.git dp3 && cd dp3 && git checkout ${DP3_BRANCH}
 RUN cd ${INSTALLDIR}/dp3/build && cmake ../dp3 -DCASACORE_ROOT_DIR=${INSTALLDIR}/casacore -DCMAKE_PREFIX_PATH=${INSTALLDIR}/lofarbeam -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/dp3
 RUN cd ${INSTALLDIR}/dp3/build && make -j 8
 RUN cd ${INSTALLDIR}/dp3/build && make install