Added in functionality for closing and exiting from the tool