Refactor to have errors bubble up to user