minor fixes and improvements
improve demo and tests coverage