[webui][api] working on POST calls
[webui][api] Refactoring. GET and POST now working via JSON. Object oriented code now in place too.