Webapp big refactor

#348
Probably returned value can be long.