Fixed unit tests and Issue #16