Clean up Main module, proper errors.