Removed unnecessary and unwanted memory operations