Fix check units,  `_check_dependencies`, derive Sg2.
Added tests.