Refactor the lecture and activity application