separate chrome calling functions into chrome.js, bug fixes