remove unused lines and chars
remove unused lines and improve memory usage