added json library
little tweaks in main
created json parsing server class