changing template for graph page and general improvements