Refactored payload validator code to be less Atom specific

This is in preparation for future support for different payloads.