Cleanup in calculator