Lower select timeout and misc fixes

Let me know if you'd like me to split this into several pull requests.