Stats module: mostly done

The only thing missing its the actual search query but the UI its
complete.