Scalable javascript framework