metrics implemented and made linear

metric are now automatically added to data structures when they are
created.