Changed object to create calculation function only once

- Reordered some functions arround
- Renamed some variables
- Fixed documentation
- detectFunction tests for browser type only on creation (Better
performance)
- Open issue: Firefox zoom equals to devicePixelRatio