General code improvements Content extraction

Smaller changes