Use sizeof() instead of hard coded length for fields