reoganise JS, split demo/toolkit, layered AMD build