Restructure and refactoring of database convert/upgrade check routine, breaking out to individual functions