Cleaned up earlier version.