Client error handling + minor stuff