Removing unused lines of code