[IMP]Added doc string in all method,removed some unnecessary code,improved code as par coding convention.