refactored default term insertion functions

completely overhauled the way default terms get inserted into the
database, check that they are there and are formatted for future terms