Worked on metrics, fixed some issues in analyze.