Made all objects store their type

All objects now store the type that they are.