Added self executing wrapper and AMD export