Added prototyping to javacript class