fix library name
move tests to own file and make them more robust