Remove unreachable code & clean up slightly
Add support for setting usertype property in mgd2 api