change to lib_common_1.py and code cleaning