Add some more function definitions

Also start PurpleConnection, though I'm not at all sure if that is
the right way to start it off.