he was a man of great education , coming from the top of society , his father was an archbishop , and he was , himself , a consultant to the king of sweden , having written several definitive scientific texts .