various internal changes and doc updates