contract tests and transform functions, interface corrections