Minor refactoring, added a sample project for pretty printing.