Added forwarding, fixed memory leaks.