Unit testin added for some methods up to index. Methods with errors were corrected

Signed-off-by: Carlos Nunez <rnunez@nearsoft.com>