Optimization phase 2

Moved analytics to the bottom