Refactoring
Removed redundant WeakMap