Initial skeleton for API lib and toplevel client