cleaning up elderberry to be a library that we can submodule into other projects