api fixes to use emit
fixes to get binary packet working
minor change