(fix) Refactored to use type parameters instead of Trait Objects.