Fixed most of the cs169test bugs listed on Pivotal Tracker