Implemented part 1. Haven't tested it yet. Also, handleUnlink is not
finished.