Added log viewer, and fixed one to many relationship.