clean up conditionals and comments for more logical flow