Improve periods utils.