Added ability to end program