Lots of fixes + poll perf. improvements.