cleaning up various things regarding tables