Use native compares when possible.
Try to address some memory leaks.