Some seriously needed cleanup