Generic models in Javascript.