First working version with dtype & io