Refactoring and binary file enhancements

Signed-off-by: Ozan Turgut <ozanturgut@gmail.com>