minor cleanup and remove redundant error class