Added block interface and model
Refactored binary file and added block support