moved test code to bin, fix spec