Adjusted main.cpp for commandline testing