Replaces all instances of for-in loop with Object.keys iter