Add pretty printer & Ex.1.2 tests