Removed template dependency from Context. Added support for polymorphic types.