update README
refactor frontend js to make life easier in the future