general improvements in the life cycle of the buttons for creating and shutting down a prolog engine