Refactor layout_countdown