Various fixes due to cleanup.