Add build script
Fix compiler warnings

This includes an uninitialized variable bug
Add .gitignore