clean up

minor adjustments to make code easier to read