Clean up of various statements, improved executeQuery