Add test function stubs
Script fixes, unit-tests, documentation.