Removed bugs from function linking and code generation. Small civic files compile now