Unbreak the dysfunction and some cleanup