removed dead code and spaces