Made a bunch of code less ass.