use AutoPrereq for dependency list.
move validate_params into module.

Will move more methods into the module.