cleanup and fixups