Better?

...s to check wrong locations, or not realizing no memory is free. Also, added some indentation after some IF*s