Added queryMessage and simplified API

API functions now return `MaybeT IO a` instead of `IO (Maybe a)`