Merge pull request #508 from ZappoMan/color_reaveraging

Color reaveraging fixes
fix several delete/delete[] mismatches
Merge pull request #509 from ZappoMan/bug_fixes

fix several delete/delete[] mismatches