Clean this code up!