move mpd callbacks and text message handling into own functions. Thanks dafoxia :)