Moved Schedule class to the top of the file