SALAM v2: total refactoring, add REST API, add web UI, integrate with smartcom