Updates to pr1a, add pr1b, create common funcs file