Minor refactoring in link controller and model. Added files to gitignore.