Added groovy class to handle resources