Refactor bin/naarad - merge to unstable branch