Changing some variable and function names to be clearer, removing some old console.log() calls, and writing better comments

Signed-off-by: Matt Bernhardt <mjbernha@mit.edu>
Adding a sortList() function to scan over a given bucket and sort the contained elements. This resolves #2

Signed-off-by: Matt Bernhardt <mjbernha@mit.edu>