Refactor definition structure for easier understanding