remove unnecessary codes and comments