getType is correct, cast, getBase, variables names + kotlin var/val fix