Rebuilt js file to use prototype/constructor form