code cleanup, some api changes for new uci_ptr struct