fix gitignore & clean up code