Restructure variables and order of checks; remove errant 'exit' line
Restructure variables and order of checks; remove errant 'exit' line

jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers