First pass at a working version of only displaying 20 elements, and properly sorting them in chronological order. Code needs to be simplified, but it works.