Minor code cleanup

Made the localizable text parameters easier to read and change; removed some unnecessary control flow that made the code much more verbose.