major refactoring

- pulled visualisation out of target detection