binstub spec, refactoring