I think rather than using exit, consider moving functions to separate
file.