Added some debug, removed unneeded variable.