A much needed cleanup of some garbage code