Re-added main function and associated imports.