QUIZ: Fixing and cleanup of code