Wrap main code in a module