Restructuring to allow use as a git submodule