Flex creates session file, various cleanup