Added c89 support. Fixed uninitialized memory bug