use SplObjectStorage
change order of methods, remove unused methods