NGUI: Templates + Providers

import of work done before the OSS rename + some refactoring