Forgot that postgres column names are case insensitive.
Cleaned up the existing code.