refactor: Put live reload outside and simplify API
doc: Add code documentation
test: Add new api tests (and a browser test)