Fixed a few bugs in ./build, updated .gitignore