More cleanup and folder remembering function