A Simple Javascript Architecture