Changed from ultra long main function to object oriented style.
Added Class RetinaManager and ported the whole code into that class, making the the whole code object oriented and not one big file main.cpp