Some cleanup and other changes