Clean some code up