Optimization: replaced some calculations with constants