added object pool
proper stack discipline - several leaks squashed
output type specifier 'L' to force value to be returned as reference; typo in switch case