Implemented cmd line parsing in main.cpp