Refactor bean mapping