removed BigNumber in favor of throwing errors, added error handler