Coils: Did a lot of code cleanup