Mostly completed assignment #4.