Optimize blob alloc
Fix exported functions