Small efficiency change to blank removal and added more comments