Cleaning up + throw errors from server