[Refactoring] fix indent style
[Refactoring] A little code cleanup in _aaGetX, _aaGetRvalueX, and _aaInX
[Refactoring] Remove code duplication