added config handler.  added broken ass json decoding