Collect functions shared with pave

This is in preparation for more formal sharing using a set of global bash functions or a third tool in the future.