fix table and other formatting details