Fixes #17 Fixed unit tests