Move methods for mapping into appropriate classes.