gitignore and other lib improvements