Adds Read packet definition. Moves some code around