Added error remapping for better error messages.  Removed some debug prints.