Javascript Redefine Class