Added lecture handling and added some tests.