fix some decref problems, and add new -t and -b switches, renaming the old -t to -p