Refactoring. Added Environment API.
Changed the type class from Type to Class<?>.