Fixes for main.c 

Added missing bool VSYNC declaration.
Removed deprecated aptSetupEventHandler();