Think I've managed to separate the diag stuff from the production stuff