Identify and refactor updateProjectiles method