code cleaning, aspect ratio fix