Refactored Binary.js