Everything Working Except Exiting smoothly.

The basic functionality works except exiting smoothly