Heavy refactoring to consolidate Bitcoin utility functions