uiobject constructor parser and minor tweaks
Restructured validTypes as a variable, other tweaks