Reverting changes in Binary and adding better tests.