added initial API code...more minor updates...doc changes