Resolved Issue related to subtype

Cleaned up some code.