added UMD wrapper and main entry point