new resource listener class and minor changes