refactored back end a bit, added front end for adding relationships