Max frameskip as 8 and code cleanup