Mostly working now, just need unsolicited events and cleanups

Signed-off-by: Lasse Bigum <lasse@bigum.org>