Added a quit function to the create function process