refactored and cleaned up sticky-header directive