Added config handler, fixed errors.