Started adding binary logic to bin file

I really need to refactor the original code for this to work, this
supports way too much on the idea that all the code is in one file.