WIP: documenting and improving test.sh