Tweak function visibility
Split select implementation into multiple functions
Fix return value of fast_read
Add a test case for select