More minor edits, adding in sql call