Manually merge #4.
  Sed oneliners and wierd date implementation