Initial working POSIX implementation