Fixed bug in which minor # was overwriting the major buffer.

- Also renamed variables, since this looked like shadowing to a non-js developer
Merge #36 r=@jiahuang: Fixed bug in which minor # was overwriting the major buffer.

- Also renamed variables, since this looked like shadowing to a non-js developer