Move more common code into functions