Cleaned up export macro to be simpler.