Bug fixes and improvements - tests. Version 0.0.2