Added check of correct name of type.
Minor changes in class.
Added check of type exists in interface members.