refactor code to remove database queries
adjust Tuning code for more flexibility
initial pass at the load dialog functions