Common types and logic for the BitWrk project