Ntk-console: Clean up command line parsing

* Make console application function
* No more segfaults
* Apply KnR style