Make some functions static
Add simple cpg cli client