Convert to use bops so it works in the browser too