simplify dtor/free, fix bug in submitTo