Consider case when code has code attribute
Consider case when code has no class