JS model ordering

Unfortunately, this is all formatting changes...

Not sure if you want it.