Remove BinaryFile class, fix some warnings.