Further cleanup of sandbox/ scripts.

See #589 and #471.