Refactoring + variable id field definition