ae1340fd72
Motivation: Clean up code to increase readability. Modification: Extract duplicate code blocks into method. Result: Less code duplication