redid the shuffle function cuz I did it wrong the first time. finished the discard function (though it's still just based on $count). Also documented php functions and created a startConnection() function to reduce repeated code