cleanup and a few fixes