Refactored Pattern.hs and Chatterbot.hs