Update .gitignore
Improve linking in build process
Allocation bugfixes