Breaking out manifoldjs code into seprate file from demo.