Added hash detail page and cleaned up the sql to be more accurate for reports.
cleaning up views and hash detail page