Thanks for the advice ellie. There have not been anymore accidents.
As for the cat litter tray problem, my female cat will stand up while weeing and it sprays the wall and then runs under the cat litter tray. I have put newspaper under the litter tray.