Basic web request code/ separated some functions. Edited index design a little to help debug json.

Signed-off-by: dckuehn <dckuehn8@gmail.com>