Added some fomatting code for graphs