Reduced nesting and added missing toString() methods.