Improves #1
Removes logging
Fixes hasAttribute usage