Refactor visualization to be generic so it's possible to switch viz