changed type to name to avoid confusion

I think the attribute type can be confusing and given that the method getName() exists, it would be better to change it to name :)