Move exception declaration to proper place.
Storage improvements;

I’m removing the concept of ‘id’ from the storage since the mechanism to find entities is via it’s ‘name’.
Rename klass to entity throughout since this is more meaningful.