extracted out prereq validations and other minor cleanup