Fixed sql issues and added gitignore