Simplify running of lesson JavaScript