Better testing & error reporting