WIP: refactoring diagnostics commands into modules