Split loading and parsing into two separate functions to make it easier to port Bas to the browser