Replace magic numbers with constants.
Improve immutability by using List instead of arr[] in
PayloadRowView/SharePayload.
Reduce Boolean expression complexity.