Added comment about further optimization removed dead code