#166. Change validator to WeakReference and add unit test