Properly initialize a couple vars to 1 instead of 0.
Adjust default n value.