Refactor code to make TLS record unpacking code and variable names consistent (there should probably be a method for TLS record unpacking)