Rename methods, fix sql
Fix tests