Implemented all system call functions (still need to implement correct error code handling)