Rework classes to avoid truncating user attributes

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Use explicit classes for empty attributes too

See 6f05439a.

Signed-off-by: Alex Coles <alex@alexbcoles.com>