Removing unused texts and blank lines