Easier validation of modules using helper functions. Updated all modules with new validation functions. Closes #351.