Added solutions (and corrected typos in comments)