header view code refactored to external module