Coils: Moved functions out of system globals