added event listeners for the factory buttons and the leave quest button