Updated prettifying code