Code tidying, fixed theme exit action