doc genration and various small changes