Added gitignore to exclude bin
Fix globals, funcs and include linking