Bug fixes, performance fixes, started on chaining support.