Prettier formatting logic