Refactoring init functions for terminator problem.