scheme tests and misc. fixes