Use getByteSize instead of getMaxLength to fix broken unit tests
more KeyPart cleanup