byte fix
moved key handling into an extra class
reading size improved