Moved everything to single cpp file