Clean out some redundant paste0() calls.

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>
Make things a little less hard coded, or at least push everything up front.
Also re-indent several sections for cleaner reading.

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>
A little more re-ordering up front.

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>