refactor bitcoin controller