Fix linking issue and add gitignore.