use $BASH_SOURCE instead of $0
.
cleanup