Got CLI handling to work and separated CLI and main functionality into separate ns