DRYed up the (inconsitent) flashmessage system

Signed-off-by: Alexander Skjolden <alex@plastboks.net>