Exit option and some tweaking of files