Now return wifi json as expected
clean up code