@phaedrux you are amazing, I had to invert them to get them to work correctly but it is now doing what it should. I am going to leave it like this for now so I can use it whilst looking into the updates you have listed. I will back everything up now so I can have a play with the firmware in a few days time.
If only I had known how easy it was to configure the endstops I would have added them when I built this.
Thank you once again for your help I'll try not to wreck it all now when I do the firmware upgrade.