Added additional code for handling json output. Also cleaned up some issues with the monitor daemon
Added create index