General cleanup and TotemTable stuff