Refactored more code. TODO: Refactor get_any_schedule HARD