This code is filthy, lets clean it up!