Split the functions in `common.sh` into their own scripts.

This breaks certain things.