Simplify the implementation slightly with better readability.