Add a design draft
Add operation getnextca, unify code, NOT DONE!

Code is currently untested, but now has capabilities for operation
getnextca. Also some code of getca and getnextca has been merged in one
function to exclude duplicate code.