Move browse-related JS to browse.js