Added proper sort of categories and isNew in sql query instead of code.
Removed redundant stuff.
Closes #17
Fixed updated author count