Changed behavior for n=0
Improved Variable and Function Names