Updates to SQL and Ruby