Added clean exit for nn using 'quit