refactor GuestbookController.java