Updated to better work with async
Updated package to be portable