latest. factoring the JS framework. adding models to php side, writing json ajax functions for JS models