Updated tool script order and functions