incorporating gregs changes, but factored out the use of global vars and disabled request expiration since it broke the !remindme functionality