Major brand_id refactor, fixes #23