Cleaned Up Game Loop Code