Made bug-script tend to be more self-containing and flexible