Better error reporting, always using state, making version argument optional