finishes up the code rearangements in preperation for MySQL-Python