Make base, keygen, source leaf elements

Closes #78