worked for issue #2. Discoveded bug in core commands (query retreival). Need to work on that.