Better Inheritance
Unnecessary initiation of var i, before the for loop
Redundant variable
Use of Native Object.keys()
Missing semicolons
Unused err variable