Add needed comments and add ability to exit