Added warnings and consolidated populate code.