Removing unneeded lines of code