Separate the type and value classes

Values can contain lists and dicts and are not sortable. Keys cannot contain those and are sortable.