TODO
Rewrite input/output discovery/recording