Event Machine implementation