rename Schedule to Interval
rename and refactor fields and methods
store return values for tests