Custom intervals

Custom intervals have been readded and made cleaner (programmatically)
than earlier. Design needs to be added now...