Finishing problem set 4. Correcting some types in problem set 3.