Cleanup some direct system calls in userspace