Added constructor for building custom controls.