Make better use of Rails ActiveRecord

This is a far more efficient way to hit the database to pull in the timetable information. Allows better work in the future, too, because it's not so nested. ;)