Rearranging code and improve the default generated image