yay, more refactoring of database functions. most of it works, upgrade list needs work still.