Webapp big refactor

#348
[Optional] add documentation