Handle Index Only scans

Didn't do a fancy regex, just a simple OR

Also changed all functions to CREATE OR REPLACE for easy updating.