Added passing test for client-defined types in DocCode:metadataTests.js;  cleaned up