Deleted unused lines and fixed string output bug