Move functions out of campick.php and into their own file