More tidying up for SQLification; Still trying to work out some inconsistencies in code.