Completed re-implementation of existin syscalls.