Logic near complete.  May have extra SQL logic.