Changed return type in init(), main() and exit() functions to avoid confusion.