Hi Nick,

That is quite a project.

It looks like you are using Proton Basic though. If you are you will receive better help here
http://www.picbasic.org/
If I am wrong post back and let us know...