Removed non useful debugging print statements.
Removed attr check that was used in a previous attempt.