Tested buffer wrapper. Solved memory leaks, other issues with factory. AH-18