prepMessage

This could be a bit nicer, if Kotlin's Generics inference would work properly, or I knew better -.-