Move a ton of code into separate mod.rs files for configuration, errors and interfaces. Also move all current commands to a plugins/control.rs file, and call that from main.rs instead of embedding them directly into main.rs.