Fix thread safety on configuration

Replace with case class and update docs.