Better error reporting.
Eliminated unnecessary factory method.