Added some constants to precompute and fixed scrol-rounding and line number bug