Cleaning up and a few fixes.