Content analysis and optimization