Added tests and resource filtering