Initial working version of match detail function.