Moved resource mapping into separate classes.