Fix code spacing and formatting to improve readability