SRAMP-29 StoredQuery support

Some formatting issues with this method.  Probably my fault - you copy/pasted some older (pre-formatting) code. :)