Added filtering and replacement of variables in resources