cleaned unnecessary vars, functions and code