epoll_reactor work. FreeBSD compatibilities. Other refactoring.