1) Make it more readable and cleaner.
2) Delete unused memory.