Revert "refactor to use less panics, return more errors"

This reverts commit dec37fed07cf57ae6924855b08a070df0f2f8c37.
rewrote to not handle errors which cannot occur