Cleaned up yesterday's code