Logic package + basic tests.