Added support for file types and some aggregate queries