Add top projects metrics and misc refactoring.