Moving type to a method