Split of main.cpp