More changes and porting of common code to NiadelCommons.