Added previous function to mpd module and associated test.