Code cleanup in profile validator. Needs a lot more\!