Fixed warnings in library and tests