Clean up and some minor fixes.