Another reorganisation! Actually, I was happy with the use of a repository, I just need to try and split the repository down into separate handlers as the main class is too large and complex.