reverting devast to single main.cc file