Added magMix parameter and cleaned up some comments.