Update Functions.hs

Generalize parseHelper to work with types of messages other than FormMessage.