Cleanup and compiler warning fixes.