Added the @export tag to several functions.
Fixed the problem with as.data.frame(query) - It should be as(query, "data.frame")