Added ability to query database from within app (woo)