clean some code up