A bit of refactoring after watching the live session