Finally managed to get things working and errors fixed.
Now only requires testing, testing & testing.