ACalc: bg.js refactor.
Merge branch 'master' of https://www.github.com/foam-framework/foam