Fixed a couple of things, including automatic calculations