Move fortune cookie functionality into a module