Fixed multiprocessing, cleaned up exit code