SQL changes and UI methods