Webapp big refactor

#348
Thanks for explanation.