Initial skeleton and tests

Bringing in code from ndoh