graphics optimization and code cleanup. removed VSync