ngui gargantuan PR

mostly renaming, adding comments, moving things around as per conversations with @nistala and @ajainarayanan ( cf #544 )

also includes Tenant form feature.