Added some util functions and exports