Fixed formatting, solved problem 2.