util: added ensure_ascii option for json_encode
web: clear code
web: added not found and internal error custom handlers