Implemented majority of the system calls.