delete debug messages + delete useless variables