bluediving: Clean up. Add package function.