#2,3 done. #9 modified slightly, needs check.