Verify refcounts of lm objects. Need a decent test script for that. Some additional lua functions? Merge sending functions, add enum to specify blocking and raw modes