Clean up some potential memory leak compiler warnings, closes #117