keep constants out of global scope

@BrentWheeldon
also changing heredoc to SQL since this makes it look nice in editors that support it