Split off a few generic functions and Bitcoin related functions in seperate helper files