switch to absolute import
re-organize sanity checks
revise test suite for new API