Allow (nearly all) in-place calculations, update tests, cleanup