Removed todo comments
Adds a check to $content instanceof Text
Removed commented code