Improved tests added more documentation