Reworked main.cpp for OOP