Fixed unused references and using's, cleaned unnecessary code.