Refactor helper methods into base_component