Defining instantiatable classes using Javascript Literal Object Notation