Add utilities and better error messages, remove fromInt