Fixed doctest
Fixed a bug in 24.  Fixed styles
Added comments, fixed style
Changed the intermediate type in 42