Convert from static polymorphism to boxed trait objects