Hello, Carmi.
Where is your attached file? I have many questions about this project, but it would be much faster just to dig into the code, than talk about it.
I have 9+ years of C/C++/Unix experience, so I can fix almost any problem in your code within 1 day. In the worst case, I can just rewrite it from sratch, but I hope there is no need in this.
So, please, give me your code, and I'll try to fix it ever before the end of this project's bidding period.
Sincerely yours, Ambience Studio team lead.