Moved schedule parser to separate function for easier customization.