added quit routine to story part; autoformated code