Started testing with a test application; a couple of fixes (not working yet)