formatting tweaks
normalized the parameter processing