continuing refactor to use sdk; compiles and runs.