Code refactoring and tested upto Share docs