Tidies up the docs.
Replace _mapRes() method with ugly math formulas to free up some memory.
Fix missing argument in getRes()