fixed way of getting title in quit function, and how we exit out.