added JsonSerialiable interface to allow json_encode
reorg controller
Merge remote-tracking branch 'upstream/master'
removed unnecessary dapi loading
more reorg; also including dapi library explicitly