delteting uneeded code and variables