Refactored code and added support for "-O binary" option