Add more malloc() validation
Remove commented out code