various bugfixes

now sends messages properly, and no longer gives compiler warnings ever.