First tests and a minor api change