Updated doc and subfunctions

-Adding support in indlm and indml for multiple values
-Updated document with minor explanations
-Reworking sampling for optimization