added gitignore and fixed mac  compatibility