Fix commandline install
Add unit tests