Added some sorting functions and a different post structure