Cleanup error handling, fix compiler warnings
README typos