Clean up specs and fix some deprecation warnings.