Fixed most of the issues that Dan commented on in his review.