Remove error raw strings from main code, and create custom `error` type. Also rename `context` to make the code more understandable.
Remove error raw strings from main code, and create custom
errortype. Also renamecontextto make the code more understandable.