Added ability to query layers