cleaned main.cpp, FindMatch to be written seperately