refractoring game controllers