Began work on quit function
Fixed merge conflict