some cleanup (which might actually make stuff harder to read