consider member classes in type()
Fix AppliedClass and AppliedMemberClass applications
more work with member vs toplevel types/functions
stupid typo