Clean Up Code, and get rid of useless declarations