Moving calc to plugins