Added state design pattern on travels
fixing some bugs on jpa