Added some extra error testing.
Fixed (cleaned) WAC class.