Unit tests and fixes for most of the Spec classes