Javascript Class Generator