fixed amb-set script to better handle wrong types
use unique pointers for memory management
fixed issues with OpenCV plugin