cleanup of beta code