Update the code of smart pointer
Introduce implementation to find matching bracket