Refactored code to make it easier to read.
Refactored colleciton validation.  Made it more readable.