Cleanup and organization. SQLs are also consistent now.