Converted everything to function as a ContainerControl

This will allow multiple instances and embedding in different window
types