Improve consistency.

Signed-off-by: crynobone <crynobone@gmail.com>
Reduce complexity.

Signed-off-by: crynobone <crynobone@gmail.com>