Moved a lot of functionality in select.c into functions. Working on creating a redundantly threaded driver for player.