minor code cleanup
fix unused error handling code
minor code cleanup