Lightweight JavaScript model and persistence library