Refactoring for handle bar and calender grid