Replaced an exit in main by return.