Restored all functionality to as it was before shared_ptr rewrite of VarPool