Improve calculations a bit