Fixed bugs in format_ns and added a proof of concept command system.